drivers: Standardize reset method naming.#143
Merged
Conversation
e2acdba to
deb4755
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Standardizes reset-related method naming across drivers to align with a consistent public API (reset() for HW pin toggle, soft_reset() for SW register reset, reboot() for trimming/memory reload), and updates impacted tests/examples/docs accordingly.
Changes:
- Rename WSEN-HIDS
reboot_memory()→reboot()and update the WSEN-HIDS full-test example. - Rename ISM330DL software
reset()→soft_reset()and update the ISM330DL mock scenario. - Document the reset naming convention in the root README.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/scenarios/ism330dl.yaml | Updates scenario script to call dev.soft_reset() instead of dev.reset(). |
| lib/wsen-hids/wsen_hids/device.py | Renames driver API method to reboot(). |
| lib/wsen-hids/examples/full_test.py | Updates example test function and call site to use reboot(). |
| lib/ism330dl/ism330dl/device.py | Renames SW reset method to soft_reset() and updates constructor call. |
| README.md | Adds a documented reset-method naming convention. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+288
to
+292
| @@ -289,7 +289,7 @@ tests: | |||
| action: script | |||
| script: | | |||
| i2c.clear_write_log() | |||
| dev.reset() | |||
| dev.soft_reset() | |||
Contributor
Author
There was a problem hiding this comment.
Fixed in 39b0ff3: test renamed to "Soft reset sets BDU and IF_INC in CTRL3_C" and section header updated.
This was referenced Mar 15, 2026
This was referenced Mar 15, 2026
|
🎉 This PR is included in version 0.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #78
Summary
Standardize reset method naming across all drivers:
reset()— hardware reset (pin toggle)soft_reset()— software reset (register write)reboot()— memory reboot (reload trimming)Changes
reboot_memory()reboot()reset()(SW reset)soft_reset()Final state
reset()soft_reset()reboot()soft_reset()soft_reset()soft_reset()reboot()reset()(HW)_soft_reset()(private)reset()(HW)reset()(HW)reboot()soft_reset()reboot()Sub-issues (missing capabilities to add)
reboot()method (BOOT bit exists in const.py)reset()method (CONTROL_RESET command exists in const.py)Also updated README with the reset naming convention.
Test plan